<template>
  <div @click="father">
    <button @click.stop="btn1">阻止事件冒泡</button>
    <a @click.prevent.stop href="http://www.baidu.com">去上网</a>
    <button @click.once="btn2" @click.stop>事件只执行一次使用.once方法</button>
  </div>
</template>

<script>
export default {
  methods:{
    father(){
      console.log('father事件触发了');
    },
    btn1(){
     
    },
    btn2(){
      console.log('only one');
    }
  }
}
</script>

<style>

</style>